#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include <vector>
using namespace std;
class AscentSequence {
public:
    int findLongest(vector<int> A, int n)
    {
        cerr << n << endl;
        vector<int> dp(n, 1);
        int Max = 0;
        for (int i = 1;i < n;i++)
        {
            for (int j = i - 1;j >= 0;j--)
            {
                if (A[i] > A[j])
                {
                    dp[i] = max(dp[j] + 1, dp[i]);
                }
            }
            Max = max(Max, dp[i]);
        }
        return Max;
    }
};